﻿using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Product.Domain.Entity;
using Product.EntityFrameworkCore.PO;

namespace Product.EntityFrameworkCore.MapConfiguration
{
    public class BrandMapConfiguration : IEntityTypeConfiguration<BrandPo>
    {
        public void Configure(EntityTypeBuilder<BrandPo> builder)
        {
            builder.ToTable("t_brand");
            builder.HasKey("Id");
            builder.Property(e => e.Id).HasMaxLength(64).IsRequired();
            builder.Property(e => e.BrandName).HasMaxLength(100).IsRequired();
            builder.Property(e => e.Version).IsRequired();
        }
    }
}
